import { ItemType } from "./ItemType";
import { ECategory } from "../../../../Message/Public/ECategory";
import { EDrug } from "../../../../Message/Public/EDrug";
import { EProp } from "../../../../Message/Public/EProp";
type int = number;
//class ItemTypeManager
    
    export  class ItemTypeManager
    {
        constructor()
        {
            
            this._map = new Map<any, any> /* flash.utils.Dictionary */();
            if (ItemTypeManager._instance != null) 
            {
                throw new Error("ItemTypeManager 单例");
            }
            this.init();
            return;
        }

        public ItemTypeManager.get map(): Map<any, any> /* flash.utils.Dictionary */
        {
            return this._map;
        }

        public getItemType(arg1: int): ItemType
        {
            return this._map[arg1];
        }

        /* internal  */init(): void
        {
            this.drugLife = new ItemType();
            this.drugLife.category = ECategory._ECategoryDrug;
            this.drugLife.type = EDrug._EDrugLife;
            this._map[0] = this.drugLife;
            this.drugMana = new ItemType();
            this.drugMana.category = ECategory._ECategoryDrug;
            this.drugMana.type = EDrug._EDrugMana;
            this._map[1] = this.drugMana;
            this.petLife = new ItemType();
            this.petLife.category = ECategory._ECategoryDrug;
            this.petLife.type = EDrug._EDrugPetLife;
            this._map[2] = this.petLife;
            this.petEnergy = new ItemType();
            this.petEnergy.category = ECategory._ECategoryDrug;
            this.petEnergy.type = EDrug._EDrugPetEnergy;
            this._map[3] = this.petEnergy;
            this.changeShape = new ItemType();
            this.changeShape.category = ECategory._ECategoryDrug;
            this.changeShape.type = EDrug._EDrugChangeShape;
            this._map[4] = this.changeShape;
            this.propSoap = new ItemType();
            this.propSoap.category = ECategory._ECategoryProp;
            this.propSoap.type = EProp._EPropSoap;
            this._map[5] = this.propSoap;
            this.skillBook = new ItemType();
            this.skillBook.category = ECategory._ECategoryProp;
            this.skillBook.type = EProp._EPropSkillBook;
            this._map[6] = this.skillBook;
            this.wine = new ItemType();
            this.wine.category = ECategory._ECategoryDrug;
            this.wine.type = EDrug._EDrugGuildFlameWine;
            this._map[7] = this.wine;
            this.fireWood = new ItemType();
            this.fireWood.category = ECategory._ECategoryProp;
            this.fireWood.type = EProp._EPropFireWood;
            this._map[8] = this.fireWood;
            this.coinSundries = new ItemType();
            this.coinSundries.category = ECategory._ECategoryProp;
            this.coinSundries.type = EProp._EPropSundries;
            this.coinSundries.effectEx = 1;
            this._map[9] = this.coinSundries;
            this.petSundries = new ItemType();
            this.petSundries.category = ECategory._ECategoryProp;
            this.petSundries.type = EProp._EPropSundries;
            this.petSundries.effectEx = 3;
            this._map[10] = this.petSundries;
            return;
        }

        public static get instance(): ItemTypeManager
        {
            if (ItemTypeManager._instance == null) 
            {
                ItemTypeManager._instance = new ItemTypeManager();
            }
            return ItemTypeManager._instance;
        }

        /* internal */ /* var */_map: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */drugLife: ItemType;

        public /* var */drugMana: ItemType;

        public /* var */petLife: ItemType;

        public /* var */petEnergy: ItemType;

        public /* var */changeShape: ItemType;

        public /* var */propSoap: ItemType;

        public /* var */skillBook: ItemType;

        public /* var */wine: ItemType;

        public /* var */fireWood: ItemType;

        public /* var */coinSundries: ItemType;

        public /* var */petSundries: ItemType;

        /* internal */ static /* var */_instance: ItemTypeManager;
    }
